package com.hup.utils.swing.demos;

import com.hup.utils.commons.swing.SimpleTestFrame;
import lombok.extern.log4j.Log4j2;

import javax.swing.*;
import java.awt.*;

/**
 * @author hugan
 * @date 2020/4/30
 */
@Log4j2
public class CommonDemo {

    public static void main(String[] args) {
        SimpleTestFrame.show(frame -> {
            JPanel panel = new JPanel(new BorderLayout());
            frame.setContentPane(panel);

            JButton button1 = new JButton("Button 1");
            JButton button2 = new JButton("Button 2");
            JButton button3 = new JButton("Button 3");

            panel.add(button1);
            panel.add(button2);
            panel.add(button3);

            panel.setComponentZOrder(button1, 1);
            panel.setComponentZOrder(button2, 0);
            panel.setComponentZOrder(button3, 2);
        });
    }

}
